FROM openjdk:8-jre-alpine
USER root
ENV LC_ALL=en_US.UTF-8 \
    LANG=en_US.UTF-8 \
    TZ=PRC \
    JAVA_OPTS="-Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=200" \
    JAVA_OPTS="-Xms1g -Xmx1g -Xss256k -XX:+UseG1GC -XX:MaxGCPauseMillis=200" \
    PARAMS=""
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY target/*.jar /demo-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /demo-0.0.1-SNAPSHOT.jar $PARAMS"]
